#include "Student.h"

using namespace std;

Student::Student()
{
    cout << "Student()" << endl;
    // 在派生类（学生类）中直接访问 public 和 protected 属性基类数据成员
    name = "jake";
    age = 15;
}

Student::~Student()
{

}

void Student::setName(const string &name)
{
    this->name = name;
}

string Student::getName() const
{
    return name;
}

void Student::setId(int id)
{
    this->id = id;
}

int Student::getId() const
{
    return id;
}

void Student::eat(int time)
{
    cout << "Student::eat()" << endl;
}